import {Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn} from 'typeorm';
import {ApiProperty} from "@nestjs/swagger";

@Entity({name:'classification'})
export class ClassificationEntity{
    @PrimaryGeneratedColumn()
    @ApiProperty({description: '主键'})
    id: number

    @Column()
    @ApiProperty({description: '分类名称'})
    cateName: string

    @Column()
    @ApiProperty({description: '分类图片'})
    cateImg: string

    @Column()
    @ApiProperty({description: '排序'})
    sort: number

    @CreateDateColumn()
    @ApiProperty({description: '创建时间'})
    createdTime: Date

    @UpdateDateColumn()
    @ApiProperty({description: '更新时间'})
    updatedTime: Date

}